/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

// Code generated by code-generation. DO NOT EDIT.

namespace org.apache.plc4net.drivers.mqtt.readwrite.model
{

    public enum MQTT_ReasonCode
    {
        SUCCESS = 0X00,
        GRANTED_QOS_1 = 0X01,
        GRANTED_QOS_2 = 0X02,
        DISCONNECT_WITH_WILL_MESSAGE = 0X04,
        NO_MATCHING_SUBSCRIBERS = 0x10,
        NO_SUBSCRIPTION_EXISTED = 0x11,
        CONTINUE_AUTHENTICATION = 0X18,
        RE_AUTHENTICATE = 0X19,
        UNSPECIFIED_ERROR = 0X80,
        MALFORMED_PACKET = 0X81,
        PROTOCOL_ERROR = 0X82,
        IMPLEMENTATION_SPECIFIC_ERROR = 0X83,
        UNSUPPORTED_PROTOCOL_VERSION = 0X84,
        CLIENT_IDENTIFIER_NOT_VALID = 0X85,
        BAD_USER_NAME_OR_PASSWORD = 0X86,
        NOT_AUTHORIZED = 0X87,
        SERVER_UNAVAILABLE = 0X88,
        SERVER_BUSY = 0X89,
        BANNED = 0X8A,
        SERVER_SHUTTING_DOWN = 0X8B,
        BAD_AUTHENTICATION_METHOD = 0X8C,
        KEEP_ALIVE_TIMEOUT = 0X8D,
        SESSION_TAKEN_OVER = 0X8E,
        TOPIC_FILTER_INVALID = 0X8F,
        TOPIC_NAME_INVALID = 0X90,
        PACKET_IDENTIFIER_IN_USE = 0X91,
        PACKET_IDENTIFIER_NOT_FOUND = 0X92,
        RECEIVE_MAXIMUM_EXCEEDED = 0X93,
        TOPIC_ALIAS_INVALID = 0X94,
        PACKET_TOO_LARGE = 0X95,
        MESSAGE_RATE_TO_HIGH = 0X96,
        QUOTA_EXCEEDED = 0X97,
        ADMINISTRATIVE_ACTION = 0X98,
        PAYLOAD_FORMAT_INVALID = 0X99,
        RETAIN_NOT_SUPPORTED = 0X9A,
        QOS_NOT_SUPPORTED = 0X9B,
        USE_ANOTHER_SERVER = 0X9C,
        SERVER_MOVED = 0X9D,
        SHARED_SUBSCRIPTIONS_NOT_SUPPORTED = 0X9E,
        CONNECTION_RATE_EXCEEDED = 0X9F,
        MAXIMUM_CONNECT_TIME = 0XA0,
        SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED = 0XA1,
        WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED = 0XA2,
    }

    public static class MQTT_ReasonCodeInfo
    {

        public static bool? DisconnectReason(this MQTT_ReasonCode value)
        {
            switch (value)
            {
                case MQTT_ReasonCode.SUCCESS: { /* '0X00' */
                    return true;
                }
                case MQTT_ReasonCode.GRANTED_QOS_1: { /* '0X01' */
                    return false;
                }
                case MQTT_ReasonCode.GRANTED_QOS_2: { /* '0X02' */
                    return false;
                }
                case MQTT_ReasonCode.DISCONNECT_WITH_WILL_MESSAGE: { /* '0X04' */
                    return true;
                }
                case MQTT_ReasonCode.CONTINUE_AUTHENTICATION: { /* '0X18' */
                    return false;
                }
                case MQTT_ReasonCode.RE_AUTHENTICATE: { /* '0X19' */
                    return false;
                }
                case MQTT_ReasonCode.UNSPECIFIED_ERROR: { /* '0X80' */
                    return true;
                }
                case MQTT_ReasonCode.MALFORMED_PACKET: { /* '0X81' */
                    return true;
                }
                case MQTT_ReasonCode.PROTOCOL_ERROR: { /* '0X82' */
                    return true;
                }
                case MQTT_ReasonCode.IMPLEMENTATION_SPECIFIC_ERROR: { /* '0X83' */
                    return true;
                }
                case MQTT_ReasonCode.UNSUPPORTED_PROTOCOL_VERSION: { /* '0X84' */
                    return false;
                }
                case MQTT_ReasonCode.CLIENT_IDENTIFIER_NOT_VALID: { /* '0X85' */
                    return false;
                }
                case MQTT_ReasonCode.BAD_USER_NAME_OR_PASSWORD: { /* '0X86' */
                    return false;
                }
                case MQTT_ReasonCode.NOT_AUTHORIZED: { /* '0X87' */
                    return true;
                }
                case MQTT_ReasonCode.SERVER_UNAVAILABLE: { /* '0X88' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_BUSY: { /* '0X89' */
                    return true;
                }
                case MQTT_ReasonCode.BANNED: { /* '0X8A' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_SHUTTING_DOWN: { /* '0X8B' */
                    return true;
                }
                case MQTT_ReasonCode.BAD_AUTHENTICATION_METHOD: { /* '0X8C' */
                    return false;
                }
                case MQTT_ReasonCode.KEEP_ALIVE_TIMEOUT: { /* '0X8D' */
                    return true;
                }
                case MQTT_ReasonCode.SESSION_TAKEN_OVER: { /* '0X8E' */
                    return true;
                }
                case MQTT_ReasonCode.TOPIC_FILTER_INVALID: { /* '0X8F' */
                    return true;
                }
                case MQTT_ReasonCode.TOPIC_NAME_INVALID: { /* '0X90' */
                    return true;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_IN_USE: { /* '0X91' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_NOT_FOUND: { /* '0X92' */
                    return false;
                }
                case MQTT_ReasonCode.RECEIVE_MAXIMUM_EXCEEDED: { /* '0X93' */
                    return true;
                }
                case MQTT_ReasonCode.TOPIC_ALIAS_INVALID: { /* '0X94' */
                    return true;
                }
                case MQTT_ReasonCode.PACKET_TOO_LARGE: { /* '0X95' */
                    return true;
                }
                case MQTT_ReasonCode.MESSAGE_RATE_TO_HIGH: { /* '0X96' */
                    return true;
                }
                case MQTT_ReasonCode.QUOTA_EXCEEDED: { /* '0X97' */
                    return true;
                }
                case MQTT_ReasonCode.ADMINISTRATIVE_ACTION: { /* '0X98' */
                    return true;
                }
                case MQTT_ReasonCode.PAYLOAD_FORMAT_INVALID: { /* '0X99' */
                    return true;
                }
                case MQTT_ReasonCode.RETAIN_NOT_SUPPORTED: { /* '0X9A' */
                    return true;
                }
                case MQTT_ReasonCode.QOS_NOT_SUPPORTED: { /* '0X9B' */
                    return true;
                }
                case MQTT_ReasonCode.USE_ANOTHER_SERVER: { /* '0X9C' */
                    return true;
                }
                case MQTT_ReasonCode.SERVER_MOVED: { /* '0X9D' */
                    return true;
                }
                case MQTT_ReasonCode.SHARED_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0X9E' */
                    return true;
                }
                case MQTT_ReasonCode.CONNECTION_RATE_EXCEEDED: { /* '0X9F' */
                    return true;
                }
                case MQTT_ReasonCode.MAXIMUM_CONNECT_TIME: { /* '0XA0' */
                    return true;
                }
                case MQTT_ReasonCode.SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED: { /* '0XA1' */
                    return true;
                }
                case MQTT_ReasonCode.WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0XA2' */
                    return true;
                }
                case MQTT_ReasonCode.NO_MATCHING_SUBSCRIBERS: { /* '0x10' */
                    return false;
                }
                case MQTT_ReasonCode.NO_SUBSCRIPTION_EXISTED: { /* '0x11' */
                    return false;
                }
                default: {
                    return false;
                }
            }
        }

        public static bool? UnsubackResponse(this MQTT_ReasonCode value)
        {
            switch (value)
            {
                case MQTT_ReasonCode.SUCCESS: { /* '0X00' */
                    return true;
                }
                case MQTT_ReasonCode.GRANTED_QOS_1: { /* '0X01' */
                    return false;
                }
                case MQTT_ReasonCode.GRANTED_QOS_2: { /* '0X02' */
                    return false;
                }
                case MQTT_ReasonCode.DISCONNECT_WITH_WILL_MESSAGE: { /* '0X04' */
                    return false;
                }
                case MQTT_ReasonCode.CONTINUE_AUTHENTICATION: { /* '0X18' */
                    return false;
                }
                case MQTT_ReasonCode.RE_AUTHENTICATE: { /* '0X19' */
                    return false;
                }
                case MQTT_ReasonCode.UNSPECIFIED_ERROR: { /* '0X80' */
                    return true;
                }
                case MQTT_ReasonCode.MALFORMED_PACKET: { /* '0X81' */
                    return false;
                }
                case MQTT_ReasonCode.PROTOCOL_ERROR: { /* '0X82' */
                    return false;
                }
                case MQTT_ReasonCode.IMPLEMENTATION_SPECIFIC_ERROR: { /* '0X83' */
                    return true;
                }
                case MQTT_ReasonCode.UNSUPPORTED_PROTOCOL_VERSION: { /* '0X84' */
                    return false;
                }
                case MQTT_ReasonCode.CLIENT_IDENTIFIER_NOT_VALID: { /* '0X85' */
                    return false;
                }
                case MQTT_ReasonCode.BAD_USER_NAME_OR_PASSWORD: { /* '0X86' */
                    return false;
                }
                case MQTT_ReasonCode.NOT_AUTHORIZED: { /* '0X87' */
                    return true;
                }
                case MQTT_ReasonCode.SERVER_UNAVAILABLE: { /* '0X88' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_BUSY: { /* '0X89' */
                    return false;
                }
                case MQTT_ReasonCode.BANNED: { /* '0X8A' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_SHUTTING_DOWN: { /* '0X8B' */
                    return false;
                }
                case MQTT_ReasonCode.BAD_AUTHENTICATION_METHOD: { /* '0X8C' */
                    return false;
                }
                case MQTT_ReasonCode.KEEP_ALIVE_TIMEOUT: { /* '0X8D' */
                    return false;
                }
                case MQTT_ReasonCode.SESSION_TAKEN_OVER: { /* '0X8E' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_FILTER_INVALID: { /* '0X8F' */
                    return true;
                }
                case MQTT_ReasonCode.TOPIC_NAME_INVALID: { /* '0X90' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_IN_USE: { /* '0X91' */
                    return true;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_NOT_FOUND: { /* '0X92' */
                    return false;
                }
                case MQTT_ReasonCode.RECEIVE_MAXIMUM_EXCEEDED: { /* '0X93' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_ALIAS_INVALID: { /* '0X94' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_TOO_LARGE: { /* '0X95' */
                    return false;
                }
                case MQTT_ReasonCode.MESSAGE_RATE_TO_HIGH: { /* '0X96' */
                    return false;
                }
                case MQTT_ReasonCode.QUOTA_EXCEEDED: { /* '0X97' */
                    return false;
                }
                case MQTT_ReasonCode.ADMINISTRATIVE_ACTION: { /* '0X98' */
                    return false;
                }
                case MQTT_ReasonCode.PAYLOAD_FORMAT_INVALID: { /* '0X99' */
                    return false;
                }
                case MQTT_ReasonCode.RETAIN_NOT_SUPPORTED: { /* '0X9A' */
                    return false;
                }
                case MQTT_ReasonCode.QOS_NOT_SUPPORTED: { /* '0X9B' */
                    return false;
                }
                case MQTT_ReasonCode.USE_ANOTHER_SERVER: { /* '0X9C' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_MOVED: { /* '0X9D' */
                    return false;
                }
                case MQTT_ReasonCode.SHARED_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0X9E' */
                    return false;
                }
                case MQTT_ReasonCode.CONNECTION_RATE_EXCEEDED: { /* '0X9F' */
                    return false;
                }
                case MQTT_ReasonCode.MAXIMUM_CONNECT_TIME: { /* '0XA0' */
                    return false;
                }
                case MQTT_ReasonCode.SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED: { /* '0XA1' */
                    return false;
                }
                case MQTT_ReasonCode.WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0XA2' */
                    return false;
                }
                case MQTT_ReasonCode.NO_MATCHING_SUBSCRIBERS: { /* '0x10' */
                    return false;
                }
                case MQTT_ReasonCode.NO_SUBSCRIPTION_EXISTED: { /* '0x11' */
                    return true;
                }
                default: {
                    return false;
                }
            }
        }

        public static bool? SubackResponse(this MQTT_ReasonCode value)
        {
            switch (value)
            {
                case MQTT_ReasonCode.SUCCESS: { /* '0X00' */
                    return true;
                }
                case MQTT_ReasonCode.GRANTED_QOS_1: { /* '0X01' */
                    return true;
                }
                case MQTT_ReasonCode.GRANTED_QOS_2: { /* '0X02' */
                    return true;
                }
                case MQTT_ReasonCode.DISCONNECT_WITH_WILL_MESSAGE: { /* '0X04' */
                    return false;
                }
                case MQTT_ReasonCode.CONTINUE_AUTHENTICATION: { /* '0X18' */
                    return false;
                }
                case MQTT_ReasonCode.RE_AUTHENTICATE: { /* '0X19' */
                    return false;
                }
                case MQTT_ReasonCode.UNSPECIFIED_ERROR: { /* '0X80' */
                    return true;
                }
                case MQTT_ReasonCode.MALFORMED_PACKET: { /* '0X81' */
                    return false;
                }
                case MQTT_ReasonCode.PROTOCOL_ERROR: { /* '0X82' */
                    return false;
                }
                case MQTT_ReasonCode.IMPLEMENTATION_SPECIFIC_ERROR: { /* '0X83' */
                    return true;
                }
                case MQTT_ReasonCode.UNSUPPORTED_PROTOCOL_VERSION: { /* '0X84' */
                    return false;
                }
                case MQTT_ReasonCode.CLIENT_IDENTIFIER_NOT_VALID: { /* '0X85' */
                    return false;
                }
                case MQTT_ReasonCode.BAD_USER_NAME_OR_PASSWORD: { /* '0X86' */
                    return false;
                }
                case MQTT_ReasonCode.NOT_AUTHORIZED: { /* '0X87' */
                    return true;
                }
                case MQTT_ReasonCode.SERVER_UNAVAILABLE: { /* '0X88' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_BUSY: { /* '0X89' */
                    return false;
                }
                case MQTT_ReasonCode.BANNED: { /* '0X8A' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_SHUTTING_DOWN: { /* '0X8B' */
                    return false;
                }
                case MQTT_ReasonCode.BAD_AUTHENTICATION_METHOD: { /* '0X8C' */
                    return false;
                }
                case MQTT_ReasonCode.KEEP_ALIVE_TIMEOUT: { /* '0X8D' */
                    return false;
                }
                case MQTT_ReasonCode.SESSION_TAKEN_OVER: { /* '0X8E' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_FILTER_INVALID: { /* '0X8F' */
                    return true;
                }
                case MQTT_ReasonCode.TOPIC_NAME_INVALID: { /* '0X90' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_IN_USE: { /* '0X91' */
                    return true;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_NOT_FOUND: { /* '0X92' */
                    return false;
                }
                case MQTT_ReasonCode.RECEIVE_MAXIMUM_EXCEEDED: { /* '0X93' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_ALIAS_INVALID: { /* '0X94' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_TOO_LARGE: { /* '0X95' */
                    return false;
                }
                case MQTT_ReasonCode.MESSAGE_RATE_TO_HIGH: { /* '0X96' */
                    return false;
                }
                case MQTT_ReasonCode.QUOTA_EXCEEDED: { /* '0X97' */
                    return true;
                }
                case MQTT_ReasonCode.ADMINISTRATIVE_ACTION: { /* '0X98' */
                    return false;
                }
                case MQTT_ReasonCode.PAYLOAD_FORMAT_INVALID: { /* '0X99' */
                    return false;
                }
                case MQTT_ReasonCode.RETAIN_NOT_SUPPORTED: { /* '0X9A' */
                    return false;
                }
                case MQTT_ReasonCode.QOS_NOT_SUPPORTED: { /* '0X9B' */
                    return false;
                }
                case MQTT_ReasonCode.USE_ANOTHER_SERVER: { /* '0X9C' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_MOVED: { /* '0X9D' */
                    return false;
                }
                case MQTT_ReasonCode.SHARED_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0X9E' */
                    return true;
                }
                case MQTT_ReasonCode.CONNECTION_RATE_EXCEEDED: { /* '0X9F' */
                    return false;
                }
                case MQTT_ReasonCode.MAXIMUM_CONNECT_TIME: { /* '0XA0' */
                    return false;
                }
                case MQTT_ReasonCode.SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED: { /* '0XA1' */
                    return true;
                }
                case MQTT_ReasonCode.WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0XA2' */
                    return true;
                }
                case MQTT_ReasonCode.NO_MATCHING_SUBSCRIBERS: { /* '0x10' */
                    return false;
                }
                case MQTT_ReasonCode.NO_SUBSCRIPTION_EXISTED: { /* '0x11' */
                    return false;
                }
                default: {
                    return false;
                }
            }
        }

        public static bool? AuthReason(this MQTT_ReasonCode value)
        {
            switch (value)
            {
                case MQTT_ReasonCode.SUCCESS: { /* '0X00' */
                    return true;
                }
                case MQTT_ReasonCode.GRANTED_QOS_1: { /* '0X01' */
                    return false;
                }
                case MQTT_ReasonCode.GRANTED_QOS_2: { /* '0X02' */
                    return false;
                }
                case MQTT_ReasonCode.DISCONNECT_WITH_WILL_MESSAGE: { /* '0X04' */
                    return false;
                }
                case MQTT_ReasonCode.CONTINUE_AUTHENTICATION: { /* '0X18' */
                    return true;
                }
                case MQTT_ReasonCode.RE_AUTHENTICATE: { /* '0X19' */
                    return true;
                }
                case MQTT_ReasonCode.UNSPECIFIED_ERROR: { /* '0X80' */
                    return false;
                }
                case MQTT_ReasonCode.MALFORMED_PACKET: { /* '0X81' */
                    return false;
                }
                case MQTT_ReasonCode.PROTOCOL_ERROR: { /* '0X82' */
                    return false;
                }
                case MQTT_ReasonCode.IMPLEMENTATION_SPECIFIC_ERROR: { /* '0X83' */
                    return false;
                }
                case MQTT_ReasonCode.UNSUPPORTED_PROTOCOL_VERSION: { /* '0X84' */
                    return false;
                }
                case MQTT_ReasonCode.CLIENT_IDENTIFIER_NOT_VALID: { /* '0X85' */
                    return false;
                }
                case MQTT_ReasonCode.BAD_USER_NAME_OR_PASSWORD: { /* '0X86' */
                    return false;
                }
                case MQTT_ReasonCode.NOT_AUTHORIZED: { /* '0X87' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_UNAVAILABLE: { /* '0X88' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_BUSY: { /* '0X89' */
                    return false;
                }
                case MQTT_ReasonCode.BANNED: { /* '0X8A' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_SHUTTING_DOWN: { /* '0X8B' */
                    return false;
                }
                case MQTT_ReasonCode.BAD_AUTHENTICATION_METHOD: { /* '0X8C' */
                    return false;
                }
                case MQTT_ReasonCode.KEEP_ALIVE_TIMEOUT: { /* '0X8D' */
                    return false;
                }
                case MQTT_ReasonCode.SESSION_TAKEN_OVER: { /* '0X8E' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_FILTER_INVALID: { /* '0X8F' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_NAME_INVALID: { /* '0X90' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_IN_USE: { /* '0X91' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_NOT_FOUND: { /* '0X92' */
                    return false;
                }
                case MQTT_ReasonCode.RECEIVE_MAXIMUM_EXCEEDED: { /* '0X93' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_ALIAS_INVALID: { /* '0X94' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_TOO_LARGE: { /* '0X95' */
                    return false;
                }
                case MQTT_ReasonCode.MESSAGE_RATE_TO_HIGH: { /* '0X96' */
                    return false;
                }
                case MQTT_ReasonCode.QUOTA_EXCEEDED: { /* '0X97' */
                    return false;
                }
                case MQTT_ReasonCode.ADMINISTRATIVE_ACTION: { /* '0X98' */
                    return false;
                }
                case MQTT_ReasonCode.PAYLOAD_FORMAT_INVALID: { /* '0X99' */
                    return false;
                }
                case MQTT_ReasonCode.RETAIN_NOT_SUPPORTED: { /* '0X9A' */
                    return false;
                }
                case MQTT_ReasonCode.QOS_NOT_SUPPORTED: { /* '0X9B' */
                    return false;
                }
                case MQTT_ReasonCode.USE_ANOTHER_SERVER: { /* '0X9C' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_MOVED: { /* '0X9D' */
                    return false;
                }
                case MQTT_ReasonCode.SHARED_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0X9E' */
                    return false;
                }
                case MQTT_ReasonCode.CONNECTION_RATE_EXCEEDED: { /* '0X9F' */
                    return false;
                }
                case MQTT_ReasonCode.MAXIMUM_CONNECT_TIME: { /* '0XA0' */
                    return false;
                }
                case MQTT_ReasonCode.SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED: { /* '0XA1' */
                    return false;
                }
                case MQTT_ReasonCode.WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0XA2' */
                    return false;
                }
                case MQTT_ReasonCode.NO_MATCHING_SUBSCRIBERS: { /* '0x10' */
                    return false;
                }
                case MQTT_ReasonCode.NO_SUBSCRIPTION_EXISTED: { /* '0x11' */
                    return false;
                }
                default: {
                    return false;
                }
            }
        }

        public static bool? PubrelPubcompResponse(this MQTT_ReasonCode value)
        {
            switch (value)
            {
                case MQTT_ReasonCode.SUCCESS: { /* '0X00' */
                    return true;
                }
                case MQTT_ReasonCode.GRANTED_QOS_1: { /* '0X01' */
                    return false;
                }
                case MQTT_ReasonCode.GRANTED_QOS_2: { /* '0X02' */
                    return false;
                }
                case MQTT_ReasonCode.DISCONNECT_WITH_WILL_MESSAGE: { /* '0X04' */
                    return false;
                }
                case MQTT_ReasonCode.CONTINUE_AUTHENTICATION: { /* '0X18' */
                    return false;
                }
                case MQTT_ReasonCode.RE_AUTHENTICATE: { /* '0X19' */
                    return false;
                }
                case MQTT_ReasonCode.UNSPECIFIED_ERROR: { /* '0X80' */
                    return false;
                }
                case MQTT_ReasonCode.MALFORMED_PACKET: { /* '0X81' */
                    return false;
                }
                case MQTT_ReasonCode.PROTOCOL_ERROR: { /* '0X82' */
                    return false;
                }
                case MQTT_ReasonCode.IMPLEMENTATION_SPECIFIC_ERROR: { /* '0X83' */
                    return false;
                }
                case MQTT_ReasonCode.UNSUPPORTED_PROTOCOL_VERSION: { /* '0X84' */
                    return false;
                }
                case MQTT_ReasonCode.CLIENT_IDENTIFIER_NOT_VALID: { /* '0X85' */
                    return false;
                }
                case MQTT_ReasonCode.BAD_USER_NAME_OR_PASSWORD: { /* '0X86' */
                    return false;
                }
                case MQTT_ReasonCode.NOT_AUTHORIZED: { /* '0X87' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_UNAVAILABLE: { /* '0X88' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_BUSY: { /* '0X89' */
                    return false;
                }
                case MQTT_ReasonCode.BANNED: { /* '0X8A' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_SHUTTING_DOWN: { /* '0X8B' */
                    return false;
                }
                case MQTT_ReasonCode.BAD_AUTHENTICATION_METHOD: { /* '0X8C' */
                    return false;
                }
                case MQTT_ReasonCode.KEEP_ALIVE_TIMEOUT: { /* '0X8D' */
                    return false;
                }
                case MQTT_ReasonCode.SESSION_TAKEN_OVER: { /* '0X8E' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_FILTER_INVALID: { /* '0X8F' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_NAME_INVALID: { /* '0X90' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_IN_USE: { /* '0X91' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_NOT_FOUND: { /* '0X92' */
                    return true;
                }
                case MQTT_ReasonCode.RECEIVE_MAXIMUM_EXCEEDED: { /* '0X93' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_ALIAS_INVALID: { /* '0X94' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_TOO_LARGE: { /* '0X95' */
                    return false;
                }
                case MQTT_ReasonCode.MESSAGE_RATE_TO_HIGH: { /* '0X96' */
                    return false;
                }
                case MQTT_ReasonCode.QUOTA_EXCEEDED: { /* '0X97' */
                    return false;
                }
                case MQTT_ReasonCode.ADMINISTRATIVE_ACTION: { /* '0X98' */
                    return false;
                }
                case MQTT_ReasonCode.PAYLOAD_FORMAT_INVALID: { /* '0X99' */
                    return false;
                }
                case MQTT_ReasonCode.RETAIN_NOT_SUPPORTED: { /* '0X9A' */
                    return false;
                }
                case MQTT_ReasonCode.QOS_NOT_SUPPORTED: { /* '0X9B' */
                    return false;
                }
                case MQTT_ReasonCode.USE_ANOTHER_SERVER: { /* '0X9C' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_MOVED: { /* '0X9D' */
                    return false;
                }
                case MQTT_ReasonCode.SHARED_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0X9E' */
                    return false;
                }
                case MQTT_ReasonCode.CONNECTION_RATE_EXCEEDED: { /* '0X9F' */
                    return false;
                }
                case MQTT_ReasonCode.MAXIMUM_CONNECT_TIME: { /* '0XA0' */
                    return false;
                }
                case MQTT_ReasonCode.SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED: { /* '0XA1' */
                    return false;
                }
                case MQTT_ReasonCode.WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0XA2' */
                    return false;
                }
                case MQTT_ReasonCode.NO_MATCHING_SUBSCRIBERS: { /* '0x10' */
                    return false;
                }
                case MQTT_ReasonCode.NO_SUBSCRIPTION_EXISTED: { /* '0x11' */
                    return false;
                }
                default: {
                    return false;
                }
            }
        }

        public static bool? PubackPubrecResponse(this MQTT_ReasonCode value)
        {
            switch (value)
            {
                case MQTT_ReasonCode.SUCCESS: { /* '0X00' */
                    return true;
                }
                case MQTT_ReasonCode.GRANTED_QOS_1: { /* '0X01' */
                    return false;
                }
                case MQTT_ReasonCode.GRANTED_QOS_2: { /* '0X02' */
                    return false;
                }
                case MQTT_ReasonCode.DISCONNECT_WITH_WILL_MESSAGE: { /* '0X04' */
                    return false;
                }
                case MQTT_ReasonCode.CONTINUE_AUTHENTICATION: { /* '0X18' */
                    return false;
                }
                case MQTT_ReasonCode.RE_AUTHENTICATE: { /* '0X19' */
                    return false;
                }
                case MQTT_ReasonCode.UNSPECIFIED_ERROR: { /* '0X80' */
                    return true;
                }
                case MQTT_ReasonCode.MALFORMED_PACKET: { /* '0X81' */
                    return false;
                }
                case MQTT_ReasonCode.PROTOCOL_ERROR: { /* '0X82' */
                    return false;
                }
                case MQTT_ReasonCode.IMPLEMENTATION_SPECIFIC_ERROR: { /* '0X83' */
                    return true;
                }
                case MQTT_ReasonCode.UNSUPPORTED_PROTOCOL_VERSION: { /* '0X84' */
                    return false;
                }
                case MQTT_ReasonCode.CLIENT_IDENTIFIER_NOT_VALID: { /* '0X85' */
                    return false;
                }
                case MQTT_ReasonCode.BAD_USER_NAME_OR_PASSWORD: { /* '0X86' */
                    return false;
                }
                case MQTT_ReasonCode.NOT_AUTHORIZED: { /* '0X87' */
                    return true;
                }
                case MQTT_ReasonCode.SERVER_UNAVAILABLE: { /* '0X88' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_BUSY: { /* '0X89' */
                    return false;
                }
                case MQTT_ReasonCode.BANNED: { /* '0X8A' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_SHUTTING_DOWN: { /* '0X8B' */
                    return false;
                }
                case MQTT_ReasonCode.BAD_AUTHENTICATION_METHOD: { /* '0X8C' */
                    return false;
                }
                case MQTT_ReasonCode.KEEP_ALIVE_TIMEOUT: { /* '0X8D' */
                    return false;
                }
                case MQTT_ReasonCode.SESSION_TAKEN_OVER: { /* '0X8E' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_FILTER_INVALID: { /* '0X8F' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_NAME_INVALID: { /* '0X90' */
                    return true;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_IN_USE: { /* '0X91' */
                    return true;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_NOT_FOUND: { /* '0X92' */
                    return false;
                }
                case MQTT_ReasonCode.RECEIVE_MAXIMUM_EXCEEDED: { /* '0X93' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_ALIAS_INVALID: { /* '0X94' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_TOO_LARGE: { /* '0X95' */
                    return false;
                }
                case MQTT_ReasonCode.MESSAGE_RATE_TO_HIGH: { /* '0X96' */
                    return false;
                }
                case MQTT_ReasonCode.QUOTA_EXCEEDED: { /* '0X97' */
                    return true;
                }
                case MQTT_ReasonCode.ADMINISTRATIVE_ACTION: { /* '0X98' */
                    return false;
                }
                case MQTT_ReasonCode.PAYLOAD_FORMAT_INVALID: { /* '0X99' */
                    return true;
                }
                case MQTT_ReasonCode.RETAIN_NOT_SUPPORTED: { /* '0X9A' */
                    return false;
                }
                case MQTT_ReasonCode.QOS_NOT_SUPPORTED: { /* '0X9B' */
                    return false;
                }
                case MQTT_ReasonCode.USE_ANOTHER_SERVER: { /* '0X9C' */
                    return false;
                }
                case MQTT_ReasonCode.SERVER_MOVED: { /* '0X9D' */
                    return false;
                }
                case MQTT_ReasonCode.SHARED_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0X9E' */
                    return false;
                }
                case MQTT_ReasonCode.CONNECTION_RATE_EXCEEDED: { /* '0X9F' */
                    return false;
                }
                case MQTT_ReasonCode.MAXIMUM_CONNECT_TIME: { /* '0XA0' */
                    return false;
                }
                case MQTT_ReasonCode.SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED: { /* '0XA1' */
                    return false;
                }
                case MQTT_ReasonCode.WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0XA2' */
                    return false;
                }
                case MQTT_ReasonCode.NO_MATCHING_SUBSCRIBERS: { /* '0x10' */
                    return true;
                }
                case MQTT_ReasonCode.NO_SUBSCRIPTION_EXISTED: { /* '0x11' */
                    return false;
                }
                default: {
                    return false;
                }
            }
        }

        public static bool? ConnackResponse(this MQTT_ReasonCode value)
        {
            switch (value)
            {
                case MQTT_ReasonCode.SUCCESS: { /* '0X00' */
                    return true;
                }
                case MQTT_ReasonCode.GRANTED_QOS_1: { /* '0X01' */
                    return false;
                }
                case MQTT_ReasonCode.GRANTED_QOS_2: { /* '0X02' */
                    return false;
                }
                case MQTT_ReasonCode.DISCONNECT_WITH_WILL_MESSAGE: { /* '0X04' */
                    return false;
                }
                case MQTT_ReasonCode.CONTINUE_AUTHENTICATION: { /* '0X18' */
                    return false;
                }
                case MQTT_ReasonCode.RE_AUTHENTICATE: { /* '0X19' */
                    return false;
                }
                case MQTT_ReasonCode.UNSPECIFIED_ERROR: { /* '0X80' */
                    return true;
                }
                case MQTT_ReasonCode.MALFORMED_PACKET: { /* '0X81' */
                    return true;
                }
                case MQTT_ReasonCode.PROTOCOL_ERROR: { /* '0X82' */
                    return true;
                }
                case MQTT_ReasonCode.IMPLEMENTATION_SPECIFIC_ERROR: { /* '0X83' */
                    return true;
                }
                case MQTT_ReasonCode.UNSUPPORTED_PROTOCOL_VERSION: { /* '0X84' */
                    return true;
                }
                case MQTT_ReasonCode.CLIENT_IDENTIFIER_NOT_VALID: { /* '0X85' */
                    return true;
                }
                case MQTT_ReasonCode.BAD_USER_NAME_OR_PASSWORD: { /* '0X86' */
                    return true;
                }
                case MQTT_ReasonCode.NOT_AUTHORIZED: { /* '0X87' */
                    return true;
                }
                case MQTT_ReasonCode.SERVER_UNAVAILABLE: { /* '0X88' */
                    return true;
                }
                case MQTT_ReasonCode.SERVER_BUSY: { /* '0X89' */
                    return true;
                }
                case MQTT_ReasonCode.BANNED: { /* '0X8A' */
                    return true;
                }
                case MQTT_ReasonCode.SERVER_SHUTTING_DOWN: { /* '0X8B' */
                    return false;
                }
                case MQTT_ReasonCode.BAD_AUTHENTICATION_METHOD: { /* '0X8C' */
                    return true;
                }
                case MQTT_ReasonCode.KEEP_ALIVE_TIMEOUT: { /* '0X8D' */
                    return false;
                }
                case MQTT_ReasonCode.SESSION_TAKEN_OVER: { /* '0X8E' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_FILTER_INVALID: { /* '0X8F' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_NAME_INVALID: { /* '0X90' */
                    return true;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_IN_USE: { /* '0X91' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_IDENTIFIER_NOT_FOUND: { /* '0X92' */
                    return false;
                }
                case MQTT_ReasonCode.RECEIVE_MAXIMUM_EXCEEDED: { /* '0X93' */
                    return false;
                }
                case MQTT_ReasonCode.TOPIC_ALIAS_INVALID: { /* '0X94' */
                    return false;
                }
                case MQTT_ReasonCode.PACKET_TOO_LARGE: { /* '0X95' */
                    return true;
                }
                case MQTT_ReasonCode.MESSAGE_RATE_TO_HIGH: { /* '0X96' */
                    return false;
                }
                case MQTT_ReasonCode.QUOTA_EXCEEDED: { /* '0X97' */
                    return true;
                }
                case MQTT_ReasonCode.ADMINISTRATIVE_ACTION: { /* '0X98' */
                    return false;
                }
                case MQTT_ReasonCode.PAYLOAD_FORMAT_INVALID: { /* '0X99' */
                    return true;
                }
                case MQTT_ReasonCode.RETAIN_NOT_SUPPORTED: { /* '0X9A' */
                    return true;
                }
                case MQTT_ReasonCode.QOS_NOT_SUPPORTED: { /* '0X9B' */
                    return true;
                }
                case MQTT_ReasonCode.USE_ANOTHER_SERVER: { /* '0X9C' */
                    return true;
                }
                case MQTT_ReasonCode.SERVER_MOVED: { /* '0X9D' */
                    return true;
                }
                case MQTT_ReasonCode.SHARED_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0X9E' */
                    return false;
                }
                case MQTT_ReasonCode.CONNECTION_RATE_EXCEEDED: { /* '0X9F' */
                    return true;
                }
                case MQTT_ReasonCode.MAXIMUM_CONNECT_TIME: { /* '0XA0' */
                    return false;
                }
                case MQTT_ReasonCode.SUBSCRIPTION_IDENTIFIERS_NOT_SUPPORTED: { /* '0XA1' */
                    return false;
                }
                case MQTT_ReasonCode.WILDCARD_SUBSCRIPTIONS_NOT_SUPPORTED: { /* '0XA2' */
                    return false;
                }
                case MQTT_ReasonCode.NO_MATCHING_SUBSCRIBERS: { /* '0x10' */
                    return false;
                }
                case MQTT_ReasonCode.NO_SUBSCRIPTION_EXISTED: { /* '0x11' */
                    return false;
                }
                default: {
                    return false;
                }
            }
        }
    }

}

